package main;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;

import javax.swing.JComponent;

public class GridComponent extends JComponent{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public GridComponent(Rectangle[][] rectangles, int[][] matrix) {
		this.rectangles = rectangles;
		this.matrix = matrix;
	}
	
	public void paintComponent(Graphics g)
	{
		Graphics2D g2 = (Graphics2D) g;
		Drawer drawer = new Drawer();
		drawer.draw(g2, rectangles, matrix);
		
	}
	
	public Rectangle[][] rectangles;
	public int[][] matrix;
}
